Repository navigation
release: install readiness from packaged crate - #2910
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reached
Next review available in: 2 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (7)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- clean_tree is consumed by publish_dry_run_check via clone(), and package_install_check's Ok(false)/Err arms only mark the gate 'not_run'. A dirty tree at package time still produces a non-failing result; the gate is no longer fail-closed. Require either re-running git status in package_install_check or fail (not not_run) when clean_tree is false.
package_install_check/run_packaged_installhas no unit test asserting the identity-diff,ripr --versionsubstring, ordoctor --json status == "pass"; rely on integrationcargo test -p xtaskto catch regressions via the readiness report schema only.- extract_packaged_crate negative test only covers entry outside expected_root. Code also rejects symlinks, hardlinks, RootDir/ParentDir/Prefix components; add tar archives containing a symlink target and a 'foo/../escape' entry to prove rejection and prevent zip-slip regression.
- release_temp_root silently falls back via unwrap_or when canonicalize fails; combine with no-iteration-cap parent walk this could allow fixtures under the source tree on adversarial temp setups. Add canonicalize errors and a bounded parent walk with an explicit escape-error.
- Extract-safety invariants (symlink/hardlink rejection, ParentDir/RootDir/Prefix component rejection, destination traversal) lack unit tests. Add focused tests so the guards cannot regress without detection.
- extract_packaged_crate rejects symlinks/hardlinks in code but the only unit test covers outside-root entries. Add a tar fixture with a symlink entry to prove link-rejection is enforced, otherwise fail-closed claim is partial.
Confirmed findings
- package_install_check receives clean_tree by value and its Ok(false)/Err branches return not_run without re-checking git state, so dirty tree after package step still records a not_run rather than fail.
- release_temp_root walks up parents until external but never verifies canonicalization succeeded for the returned candidate, allowing symlinked temp dirs to land inside the workspace.
- active-view invariants hold; residual risk is OS-specific canonicalize fallback in release_temp_root which is an active-cwd concern rather than a buffer-view bug.
- Diff class is source-ub in Rust (xtask release-readiness packaging/install/doctor fixture). No JS-backed worker, async, GC, detach, or transferable boundary is introduced or modified by this PR. ub-worker-handoff lane is out of scope; no actionable worker-handoff issue.
- release_temp_root walks parent until outside cwd; no test asserts it never returns cwd or a subpath, leaving a quiet UB/oracle hole if std::env::temp_dir resolves inside the workspace.
Verification questions
[review body truncated; see review artifacts]
[review body truncated; see review artifacts]
|
Local closeout update on exact head cb53699: cargo test -p xtask passed 1,427/1,427 and cargo xtask precommit passed. cargo xtask check-pr reached the workspace test gate but failed four existing crates/ripr/tests/cli_smoke.rs cases because the doctor rustc probe timed out at its 5s bound, plus pr_summary_does_not_invoke_cargo exceeded its 10s budget. This PR does not touch those surfaces. The exact doctor_reports_missing_config_defaults case passed on pristine origin/main 8d3f01c in an isolated target, so the broad failure is retained as a current runner/Cargo contention limitation, not claimed as a package-install failure. Required hosted checks remain GitHub-owned; the PR stays draft. |
cb53699 to
db1d12c
Compare
|
Final local proof is on current head db1d12c (documentation-only amendment after the implementation head): cargo xtask precommit passed. The package-install receipt remains valid for the unchanged production implementation at cb53699; the amendment only clarifies that the old path-install block is supplemental and cannot substitute for the packaged-crate receipt. PR remains draft while hosted checks/review are remote-owned. No merge or release-candidate state changed. |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce3caaec6e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- PR body claims clean-head
cargo xtask release-readiness --version 0.10.0required/pass; this is a 0.10.0 rehearsal, not 0.11 candidate qualification, but docs do not pin which version the receipt binds to. - Lane scope (resizable buffer / active-view vs backing store, TypedArray detach/transfer, stale length snapshots) is not engaged by this diff. xtask release-readiness touches Rust file I/O and process invocation only; no JS/WASM/JS-engine buffer object is reachable from changed code. No blocker/high/medium actionable issue under this lane.
- This lane is JS/TS-worker-handoff scoped; the PR is Rust-only xtask release-readiness. No MessagePort, postMessage, transferable, detached buffer, or worker-handoff surface is touched, so no lane-specific blocker/high/medium finding is produced. Residual risk: capture_output_in_dir blocks the caller; not a worker-handoff concern.
- validate_binary_identity, validate_installed_version, and validate_doctor_result are tested for the rejection paths and one positive case each, but no test pins down that the digests fed in are actually produced by sha256 over distinct on-disk binaries (e.g., tampered-digest pair or swapped arguments). This is submaterial polish relative to the named-validator coverage claim.
- PR claims 1431 unit tests passed; local comment notes 1427 at cb53699 and 1431 at ce3caae. The unit-test count delta is consistent with the five new tests in diff (extraction/symlink-hardlink/traversal/identity-version-doctor/fixture-root), but no third-party receipt corroborates the new total.
- package_install_check still re-reads git_worktree_is_clean inline before run_packaged_install; consider passing the freshness check as an explicit dependency (e.g., a fn(&Path) -> Result<bool, String> injected at construction) so the gate can be unit-tested without depending on the real worktree.
Verification questions
- Confirm run.rs addition capture_output_in_dir is a synchronous Command::new(...).current_dir(...).output() that buffers stdout/stderr into owned String. No async, no spawn, no worker thread, no lifetime/ownership of buffers across a boundary.
- Confirm pR omits negative tests for cargo install failure in run_packaged_install (missing installed_binary branch returns Ok(false) without asserting); doctor JSON shape not asserted (only status pass); archive digest recorded but not asserted to match a re-extract. These are test-oracle gaps.
- Confirm extract_packaged_crate end-to-end fixtures cover outside-root, symlink, hardlink rejection but do not construct an entry whose path starts with expected_root yet traverses via foo/../escape.
- Confirm validate_binary_identity checks inequality of two strings; never verifies digests are actually sha256 over real binaries (e.g., could be empty hashes, could be tampered workspace hash, could be cross-checked against installed path content).
- Confirm capture_output_in_dir in xtask/src/run.rs duplicates capture_output's command+output+utf8-lossy shape, differing only by current_dir and a context label; two helpers add surface area without a documented reason.
Verification questions
Refuted
[review body truncated; see review artifacts]
[review body truncated; see review artifacts]
What this does
Closes the packaged-install portion of #2834 without changing the release candidate or publication state.
cargo xtask release-readinessnow packages the requestedriprcrate, validates and extracts its gzip/tar archive outside the workspace, installs from that extracted source with an absolute install root, compares installed and workspace binary digests, verifiesripr --version, and runsdoctor --root <external-fixture> --jsonbefore cleanup. The package/install gate re-checks worktree cleanliness immediately before packaging and fails required when state is dirty or unverifiable.Scope and claim boundary
xtask/src/reports/release.rsplus the cwd-bound runner and process-policy receipt already present on this branch.checkjourney and Linux/Windows release receipts tracked by the remaining release(rehearsal): install the packaged crate and exercise the public CLI outside the workspace #2834 work.Verification
foo/../escape, symlink, and hardlink rejectioncargo check -p xtask --all-targetscargo clippy -p xtask --all-targets -- -D warningscargo test -p xtaskcargo xtask precommitcargo xtask release-readiness --version 0.10.0package-install; archive/install/identity/version/doctor evidence recordedThe clean-head rehearsal is a package-proof rehearsal, not 0.11 candidate qualification. The broad
check-prlane is governed by hosted/current-main evidence and is not represented as green here while its routed check is still in progress.Review map
xtask/src/reports/release.rs: fail-closed package/install gate, typed validation helpers, archive safety, bounded external temp-root selection, and focused fixtures.xtask/src/run.rs: cwd-bound captured process output for external package and fixture commands.policy/process_allowlist.txt: command-runner receipt for the packaged-release smoke.docs/OUTPUT_SCHEMA.md,docs/PR_AUTOMATION.md,docs/INSTALLATION_VERIFICATION.md: packaged-crate evidence contract.Review response
All six actionable review threads were repaired, answered with exact-head proof, and resolved on
ce3caaec6:Known limitations